package com.example.demo.setstudy;

import java.util.HashSet;

/**
 * @Description StudentTest
 * @Author songchuanlong
 * @Date 2025-05-12
 */
public class StudentTest1 {
    public static void main(String[] args) {
        HashSet<Student> stu = new HashSet<>();
        Student s1 = new Student("小帅", 18, 183);
        Student s2 = new Student("小梅", 17, 172);
        Student s3 = new Student("小梅", 17, 172);
        stu.add(s1);
        stu.add(s2);
        stu.add(s3);
        System.out.println(stu);

        System.out.println(s1.hashCode());
        System.out.println(s2.hashCode());
        System.out.println(s3.hashCode());
//
//        System.out.println(s1);
//        System.out.println(s2);
//        System.out.println(s3);
    }
}
